package com.waimai.adapter;

import com.waimai.entity.Address;
import com.waimai.entity.Restaurant;

/**
 * 餐厅适配器
 * 
 * @author comingundone
 * 
 * @param mName
 *            餐厅名称
 * @param mSaleList
 *            满减列表
 * @param mHrefUrl
 *            餐厅链接Url
 * @param mDrinkList
 *            饮料列表
 * @param mCompany
 *            公司
 * @param mMaxBack
 *            最高红包
 * @param mStatus
 *            餐厅状态
 * @param mMinusRatio
 *            减满比
 * @param mImgUrl
 *            餐厅图标Url
 * @param mTotalPerMon
 *            月售份数
 * @param mSendTime
 *            时间
 * @param mStartPrice
 *            起送价
 * @param mSendPrice
 *            配送费
 * 
 * 
 * 
 */
public class RestaurantAdapter extends Restaurant {
	private Address address;
	private String mSendTime;
	private String mStartPrice;
	private String mSendPrice;

	public RestaurantAdapter() {
		super();
	}

	public RestaurantAdapter(Restaurant restaurant, Address address,
			String sendTime, String startPrice, String sendPrice) {
		super();
		this.mId = restaurant.getId();
		this.mName = restaurant.getName();
		this.mSaleList = restaurant.getSaleList();
		this.mHrefUrl = restaurant.getHrefUrl();
		this.mDrinkList = restaurant.getDrinkList();
		this.mCompany = restaurant.getCompany();
		this.mMaxBack = restaurant.getMaxBack();
		this.mStatus = restaurant.getStatus();
		setMinusRatio();
		this.mImgUrl = restaurant.getImgUrl();
		this.mTotalPerMon = restaurant.getTotalPerMon();

		this.address = address;
		this.mSendTime = sendTime;
		this.mStartPrice = startPrice;
		this.mSendPrice = sendPrice;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public String getSendTime() {
		return mSendTime;
	}

	public void setSendTime(String sendTime) {
		this.mSendTime = sendTime;
	}

	public String getStartPrice() {
		return mStartPrice;
	}

	public void setStartPrice(String startPrice) {
		this.mStartPrice = startPrice;
	}

	public String getSendPrice() {
		return mSendPrice;
	}

	public void setSendPrice(String sendPrice) {
		this.mSendPrice = sendPrice;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer(super.toString());
		sb.append("SendTime" + getSendTime() + "\n");
		sb.append("StartPrice" + getStartPrice() + "\n");
		sb.append("SendPrice" + getSendPrice() + "\n");
		return sb.toString();
	}

}
